package com.example.springdemo6.service;


import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;

@Service
public class LoginService {

    public boolean login(String userName, String password) {
        //判断是否为空
        if(!StringUtils.hasLength(userName) || !StringUtils.hasLength(password)) {
            return false;
        }else if("zhangSan".equals(userName) && "666666".equals(password)) {
            return true;
        }
        return false;
    }

}
